	format	MS COFF
	extrn	___bb_appstub_appstub
	extrn	___bb_audio_audio
	extrn	___bb_bank_bank
	extrn	___bb_bankstream_bankstream
	extrn	___bb_basic_basic
	extrn	___bb_blitz_blitz
	extrn	___bb_bmploader_bmploader
	extrn	___bb_d3d7max2d_d3d7max2d
	extrn	___bb_d3d9max2d_d3d9max2d
	extrn	___bb_data_data
	extrn	___bb_directsoundaudio_directsoundaudio
	extrn	___bb_eventqueue_eventqueue
	extrn	___bb_freeaudioaudio_freeaudioaudio
	extrn	___bb_freejoy_freejoy
	extrn	___bb_freeprocess_freeprocess
	extrn	___bb_freetypefont_freetypefont
	extrn	___bb_glew_glew
	extrn	___bb_gnet_gnet
	extrn	___bb_jpgloader_jpgloader
	extrn	___bb_macos_macos
	extrn	___bb_map_map
	extrn	___bb_maxlua_maxlua
	extrn	___bb_maxml_maxml
	extrn	___bb_maxutil_maxutil
	extrn	___bb_oggloader_oggloader
	extrn	___bb_openalaudio_openalaudio
	extrn	___bb_pngloader_pngloader
	extrn	___bb_retro_retro
	extrn	___bb_tgaloader_tgaloader
	extrn	___bb_threads_threads
	extrn	___bb_timer_timer
	extrn	___bb_wavloader_wavloader
	extrn	_bbGCFree
	extrn	_bbNullObject
	extrn	_bbObjectClass
	extrn	_bbObjectCompare
	extrn	_bbObjectCtor
	extrn	_bbObjectFree
	extrn	_bbObjectRegisterType
	extrn	_bbObjectReserved
	extrn	_bbObjectSendMessage
	extrn	_bbObjectToString
	extrn	_bbOnDebugEnterScope
	extrn	_bbOnDebugEnterStm
	extrn	_bbOnDebugLeaveScope
	extrn	_brl_blitz_NullObjectError
	extrn	_brl_d3d9max2d_D3D9Max2DDriver
	extrn	_brl_graphics_CloseGraphics
	extrn	_brl_graphics_CreateGraphics
	extrn	_brl_graphics_SetGraphics
	extrn	_brl_graphics_SetGraphicsDriver
	public	___bb_gfx_maingraphics
	public	__bb_Main_Graphics_Delete
	public	__bb_Main_Graphics_New
	public	__bb_Main_Graphics_Set
	public	__bb_Main_Graphics_UseDriver
	public	_bb_Main_Graphics
	section	"code" code
___bb_gfx_maingraphics:
	push	ebp
	mov	ebp,esp
	push	ebx
	cmp	dword [_57],0
	je	_58
	mov	eax,0
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
_58:
	mov	dword [_57],1
	push	ebp
	push	_55
	call	dword [_bbOnDebugEnterScope]
	add	esp,8
	call	___bb_blitz_blitz
	call	___bb_appstub_appstub
	call	___bb_audio_audio
	call	___bb_bank_bank
	call	___bb_bankstream_bankstream
	call	___bb_basic_basic
	call	___bb_bmploader_bmploader
	call	___bb_d3d7max2d_d3d7max2d
	call	___bb_d3d9max2d_d3d9max2d
	call	___bb_data_data
	call	___bb_directsoundaudio_directsoundaudio
	call	___bb_eventqueue_eventqueue
	call	___bb_freeaudioaudio_freeaudioaudio
	call	___bb_freetypefont_freetypefont
	call	___bb_gnet_gnet
	call	___bb_jpgloader_jpgloader
	call	___bb_map_map
	call	___bb_maxlua_maxlua
	call	___bb_maxutil_maxutil
	call	___bb_oggloader_oggloader
	call	___bb_openalaudio_openalaudio
	call	___bb_pngloader_pngloader
	call	___bb_retro_retro
	call	___bb_tgaloader_tgaloader
	call	___bb_threads_threads
	call	___bb_timer_timer
	call	___bb_wavloader_wavloader
	call	___bb_freejoy_freejoy
	call	___bb_freeprocess_freeprocess
	call	___bb_glew_glew
	call	___bb_macos_macos
	call	___bb_maxml_maxml
	push	_bb_Main_Graphics
	call	_bbObjectRegisterType
	add	esp,4
	mov	ebx,0
	jmp	_40
_40:
	call	dword [_bbOnDebugLeaveScope]
	mov	eax,ebx
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Main_Graphics_New:
	push	ebp
	mov	ebp,esp
	sub	esp,4
	push	ebx
	push	esi
	mov	eax,dword [ebp+8]
	mov	dword [ebp-4],eax
	push	ebp
	push	_70
	call	dword [_bbOnDebugEnterScope]
	add	esp,8
	push	dword [ebp-4]
	call	_bbObjectCtor
	add	esp,4
	mov	eax,dword [ebp-4]
	mov	dword [eax],_bb_Main_Graphics
	mov	edx,_bbNullObject
	inc	dword [edx+4]
	mov	eax,dword [ebp-4]
	mov	dword [eax+8],edx
	mov	edx,_bbNullObject
	inc	dword [edx+4]
	mov	eax,dword [ebp-4]
	mov	dword [eax+12],edx
	mov	eax,dword [ebp-4]
	mov	dword [eax+16],800
	mov	eax,dword [ebp-4]
	mov	dword [eax+20],600
	mov	eax,dword [ebp-4]
	mov	dword [eax+24],0
	mov	eax,dword [ebp-4]
	mov	dword [eax+28],60
	mov	eax,dword [ebp-4]
	mov	dword [eax+32],2
	push	_61
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_64
	call	_brl_blitz_NullObjectError
_64:
	call	_brl_d3d9max2d_D3D9Max2DDriver
	inc	dword [eax+4]
	mov	esi,eax
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_69
	push	eax
	call	_bbGCFree
	add	esp,4
_69:
	mov	dword [ebx+12],esi
	mov	ebx,0
	jmp	_43
_43:
	call	dword [_bbOnDebugLeaveScope]
	mov	eax,ebx
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Main_Graphics_Delete:
	push	ebp
	mov	ebp,esp
	push	ebx
	mov	ebx,dword [ebp+8]
_46:
	mov	eax,dword [ebx+12]
	dec	dword [eax+4]
	jnz	_75
	push	eax
	call	_bbGCFree
	add	esp,4
_75:
	mov	eax,dword [ebx+8]
	dec	dword [eax+4]
	jnz	_77
	push	eax
	call	_bbGCFree
	add	esp,4
_77:
	mov	eax,0
	jmp	_73
_73:
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Main_Graphics_UseDriver:
	push	ebp
	mov	ebp,esp
	sub	esp,8
	push	ebx
	push	esi
	mov	eax,dword [ebp+8]
	mov	dword [ebp-4],eax
	mov	eax,dword [ebp+12]
	mov	dword [ebp-8],eax
	push	ebp
	push	_89
	call	dword [_bbOnDebugEnterScope]
	add	esp,8
	push	_78
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	esi,dword [ebp-4]
	cmp	esi,_bbNullObject
	jne	_80
	call	_brl_blitz_NullObjectError
_80:
	mov	ebx,dword [ebp-8]
	inc	dword [ebx+4]
	mov	eax,dword [esi+12]
	dec	dword [eax+4]
	jnz	_85
	push	eax
	call	_bbGCFree
	add	esp,4
_85:
	mov	dword [esi+12],ebx
	push	_86
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_88
	call	_brl_blitz_NullObjectError
_88:
	push	2
	push	dword [ebx+12]
	call	_brl_graphics_SetGraphicsDriver
	add	esp,8
	mov	ebx,0
	jmp	_50
_50:
	call	dword [_bbOnDebugLeaveScope]
	mov	eax,ebx
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
__bb_Main_Graphics_Set:
	push	ebp
	mov	ebp,esp
	sub	esp,16
	push	ebx
	push	esi
	push	edi
	mov	eax,dword [ebp+8]
	mov	dword [ebp-4],eax
	mov	eax,ebp
	push	eax
	push	_119
	call	dword [_bbOnDebugEnterScope]
	add	esp,8
	push	_91
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_93
	call	_brl_blitz_NullObjectError
_93:
	cmp	dword [ebx+8],_bbNullObject
	je	_94
	push	_95
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_97
	call	_brl_blitz_NullObjectError
_97:
	push	dword [ebx+8]
	call	_brl_graphics_CloseGraphics
	add	esp,4
_94:
	push	_98
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_100
	call	_brl_blitz_NullObjectError
_100:
	mov	dword [ebp-16],ebx
	mov	eax,dword [ebp-4]
	mov	dword [ebp-12],eax
	cmp	dword [ebp-12],_bbNullObject
	jne	_103
	call	_brl_blitz_NullObjectError
_103:
	mov	eax,dword [ebp-4]
	mov	dword [ebp-8],eax
	cmp	dword [ebp-8],_bbNullObject
	jne	_105
	call	_brl_blitz_NullObjectError
_105:
	mov	edi,dword [ebp-4]
	cmp	edi,_bbNullObject
	jne	_107
	call	_brl_blitz_NullObjectError
_107:
	mov	esi,dword [ebp-4]
	cmp	esi,_bbNullObject
	jne	_109
	call	_brl_blitz_NullObjectError
_109:
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_111
	call	_brl_blitz_NullObjectError
_111:
	push	dword [ebx+32]
	push	dword [esi+28]
	push	dword [edi+24]
	mov	eax,dword [ebp-8]
	push	dword [eax+20]
	mov	eax,dword [ebp-12]
	push	dword [eax+16]
	call	_brl_graphics_CreateGraphics
	add	esp,20
	mov	ebx,eax
	inc	dword [ebx+4]
	mov	eax,dword [ebp-16]
	mov	eax,dword [eax+8]
	dec	dword [eax+4]
	jnz	_115
	push	eax
	call	_bbGCFree
	add	esp,4
_115:
	mov	eax,dword [ebp-16]
	mov	dword [eax+8],ebx
	push	_116
	call	dword [_bbOnDebugEnterStm]
	add	esp,4
	mov	ebx,dword [ebp-4]
	cmp	ebx,_bbNullObject
	jne	_118
	call	_brl_blitz_NullObjectError
_118:
	push	dword [ebx+8]
	call	_brl_graphics_SetGraphics
	add	esp,4
	mov	ebx,0
	jmp	_53
_53:
	call	dword [_bbOnDebugLeaveScope]
	mov	eax,ebx
	pop	edi
	pop	esi
	pop	ebx
	mov	esp,ebp
	pop	ebp
	ret
	section	"data" data writeable align 8
	align	4
_57:
	dd	0
_56:
	db	"MainGraphics",0
	align	4
_55:
	dd	1
	dd	_56
	dd	0
_23:
	db	"Main_Graphics",0
_24:
	db	"GFX",0
_25:
	db	":brl.graphics.TGraphics",0
_26:
	db	"GFX_Driver",0
_27:
	db	":brl.graphics.TGraphicsDriver",0
_28:
	db	"width",0
_29:
	db	"i",0
_30:
	db	"height",0
_31:
	db	"depth",0
_32:
	db	"hertz",0
_33:
	db	"flags",0
_34:
	db	"New",0
_35:
	db	"()i",0
_36:
	db	"Delete",0
_37:
	db	"UseDriver",0
_38:
	db	"(:brl.graphics.TGraphicsDriver)i",0
_39:
	db	"Set",0
	align	4
_22:
	dd	2
	dd	_23
	dd	3
	dd	_24
	dd	_25
	dd	8
	dd	3
	dd	_26
	dd	_27
	dd	12
	dd	3
	dd	_28
	dd	_29
	dd	16
	dd	3
	dd	_30
	dd	_29
	dd	20
	dd	3
	dd	_31
	dd	_29
	dd	24
	dd	3
	dd	_32
	dd	_29
	dd	28
	dd	3
	dd	_33
	dd	_29
	dd	32
	dd	6
	dd	_34
	dd	_35
	dd	16
	dd	6
	dd	_36
	dd	_35
	dd	20
	dd	6
	dd	_37
	dd	_38
	dd	48
	dd	6
	dd	_39
	dd	_35
	dd	52
	dd	0
	align	4
_bb_Main_Graphics:
	dd	_bbObjectClass
	dd	_bbObjectFree
	dd	_22
	dd	36
	dd	__bb_Main_Graphics_New
	dd	__bb_Main_Graphics_Delete
	dd	_bbObjectToString
	dd	_bbObjectCompare
	dd	_bbObjectSendMessage
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	_bbObjectReserved
	dd	__bb_Main_Graphics_UseDriver
	dd	__bb_Main_Graphics_Set
_71:
	db	"Self",0
_72:
	db	":Main_Graphics",0
	align	4
_70:
	dd	1
	dd	_34
	dd	2
	dd	_71
	dd	_72
	dd	-4
	dd	0
_62:
	db	"$BMXPATH/spaget/src/GFX/MainGraphics.bmx",0
	align	4
_61:
	dd	_62
	dd	11
	dd	3
_90:
	db	"Driver",0
	align	4
_89:
	dd	1
	dd	_37
	dd	2
	dd	_71
	dd	_72
	dd	-4
	dd	2
	dd	_90
	dd	_27
	dd	-8
	dd	0
	align	4
_78:
	dd	_62
	dd	18
	dd	3
	align	4
_86:
	dd	_62
	dd	19
	dd	3
	align	4
_119:
	dd	1
	dd	_39
	dd	2
	dd	_71
	dd	_72
	dd	-4
	dd	0
	align	4
_91:
	dd	_62
	dd	28
	dd	3
	align	4
_95:
	dd	_62
	dd	29
	dd	4
	align	4
_98:
	dd	_62
	dd	31
	dd	3
	align	4
_116:
	dd	_62
	dd	32
	dd	3
